package org.alan7yg.aop_sample;

import lombok.Data;

/**
 * Common HTTP response entity.
 * Created by alan on 8/19/16.
 */
@Data
public class CommonHttpResponse<T> {
    /**
     * response status code
     */
    private final RespCode status;

    /**
     * specific data
     */
    private final T data;

    public static <T> CommonHttpResponse<T> ok(T data) {
        return new CommonHttpResponse<T>(RespCode.SUCCESS, data);
    }
}
